YES 0.924
H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/empty.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:
↳ HASKELL
↳ BR
mainModule Main
| ((lookup :: Char -> [(Char,a)] -> Maybe a) :: Char -> [(Char,a)] -> Maybe a) |
module Main where
Replaced joker patterns by fresh variables and removed binding patterns.
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
mainModule Main
| ((lookup :: Char -> [(Char,a)] -> Maybe a) :: Char -> [(Char,a)] -> Maybe a) |
module Main where
Cond Reductions:
The following Function with conditions
is transformed to
undefined0 | True | = undefined |
undefined1 | | = undefined0 False |
The following Function with conditions
lookup | k [] | = Nothing |
lookup | k ((x,y) : xys) | |
is transformed to
lookup | k [] | = lookup3 k [] |
lookup | k ((x,y) : xys) | = lookup2 k ((x,y) : xys) |
lookup1 | k x y xys True | = Just y |
lookup1 | k x y xys False | = lookup0 k x y xys otherwise |
lookup0 | k x y xys True | = lookup k xys |
lookup2 | k ((x,y) : xys) | = lookup1 k x y xys (k == x) |
lookup3 | k [] | = Nothing |
lookup3 | wu wv | = lookup2 wu wv |
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
mainModule Main
| (lookup :: Char -> [(Char,a)] -> Maybe a) |
module Main where
Haskell To QDPs
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
new_lookup10(ww36, ww37, ww38, ww39, ba) → new_lookup(Char(Succ(ww36)), ww39, ba)
new_lookup1(ww36, ww37, ww38, ww39, Zero, Succ(ww410), ba) → new_lookup10(ww36, ww37, ww38, ww39, ba)
new_lookup(Char(Succ(ww300)), :(@2(Char(Succ(ww40000)), ww401), ww41), bb) → new_lookup1(ww300, ww40000, ww401, ww41, ww300, ww40000, bb)
new_lookup(Char(Zero), :(@2(Char(Succ(ww40000)), ww401), ww41), bb) → new_lookup(Char(Zero), ww41, bb)
new_lookup1(ww36, ww37, ww38, ww39, Succ(ww400), Succ(ww410), ba) → new_lookup1(ww36, ww37, ww38, ww39, ww400, ww410, ba)
new_lookup1(ww36, ww37, ww38, ww39, Succ(ww400), Zero, ba) → new_lookup(Char(Succ(ww36)), ww39, ba)
new_lookup(Char(Succ(ww300)), :(@2(Char(Zero), ww401), ww41), bb) → new_lookup(Char(Succ(ww300)), ww41, bb)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 2 SCCs.
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_lookup(Char(Zero), :(@2(Char(Succ(ww40000)), ww401), ww41), bb) → new_lookup(Char(Zero), ww41, bb)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_lookup(Char(Zero), :(@2(Char(Succ(ww40000)), ww401), ww41), bb) → new_lookup(Char(Zero), ww41, bb)
The graph contains the following edges 1 >= 1, 2 > 2, 3 >= 3
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
Q DP problem:
The TRS P consists of the following rules:
new_lookup10(ww36, ww37, ww38, ww39, ba) → new_lookup(Char(Succ(ww36)), ww39, ba)
new_lookup1(ww36, ww37, ww38, ww39, Zero, Succ(ww410), ba) → new_lookup10(ww36, ww37, ww38, ww39, ba)
new_lookup(Char(Succ(ww300)), :(@2(Char(Succ(ww40000)), ww401), ww41), bb) → new_lookup1(ww300, ww40000, ww401, ww41, ww300, ww40000, bb)
new_lookup1(ww36, ww37, ww38, ww39, Succ(ww400), Succ(ww410), ba) → new_lookup1(ww36, ww37, ww38, ww39, ww400, ww410, ba)
new_lookup1(ww36, ww37, ww38, ww39, Succ(ww400), Zero, ba) → new_lookup(Char(Succ(ww36)), ww39, ba)
new_lookup(Char(Succ(ww300)), :(@2(Char(Zero), ww401), ww41), bb) → new_lookup(Char(Succ(ww300)), ww41, bb)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_lookup1(ww36, ww37, ww38, ww39, Succ(ww400), Zero, ba) → new_lookup(Char(Succ(ww36)), ww39, ba)
The graph contains the following edges 4 >= 2, 7 >= 3
- new_lookup(Char(Succ(ww300)), :(@2(Char(Succ(ww40000)), ww401), ww41), bb) → new_lookup1(ww300, ww40000, ww401, ww41, ww300, ww40000, bb)
The graph contains the following edges 1 > 1, 2 > 2, 2 > 3, 2 > 4, 1 > 5, 2 > 6, 3 >= 7
- new_lookup1(ww36, ww37, ww38, ww39, Succ(ww400), Succ(ww410), ba) → new_lookup1(ww36, ww37, ww38, ww39, ww400, ww410, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 >= 4, 5 > 5, 6 > 6, 7 >= 7
- new_lookup1(ww36, ww37, ww38, ww39, Zero, Succ(ww410), ba) → new_lookup10(ww36, ww37, ww38, ww39, ba)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 >= 4, 7 >= 5
- new_lookup10(ww36, ww37, ww38, ww39, ba) → new_lookup(Char(Succ(ww36)), ww39, ba)
The graph contains the following edges 4 >= 2, 5 >= 3
- new_lookup(Char(Succ(ww300)), :(@2(Char(Zero), ww401), ww41), bb) → new_lookup(Char(Succ(ww300)), ww41, bb)
The graph contains the following edges 1 >= 1, 2 > 2, 3 >= 3